Apple Partition Map
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
top
Disks using the Apple Partition Map are divided into logical blocks, with 512 bytes usually belonging to each block. The first block, Block 0, contains an Apple-specific data structure called "Driver Descriptor Map" for the Macintosh Toolbox ROM to load driver updates and patches before loading from an MFS or HFS partition.cite-ref-apple-ta21692-2-0[2] Because APM allows 32 bits worth of logical blocks, the historical size of an APM formatted disk using small blockscite-ref-apple-2786955-3-0[3] is limited to 2 TiB.cite-ref-myers-apmtogpt-4-0[4]
The Apple Partition Map maps out all space used (including the map) and unused (free space) on disk, unlike the minimal x86 master boot record that only accounts for used non-map partitions. This means that every block on the disk (with the exception of the first block, Block 0) belongs to a partition.
Some hybrid disks contain both an ISO 9660 primary volume descriptor and an Apple Partition Map, thus allowing the disc to work on different types of computers, including Apple systems.
Contents
β’ Intel-based Macs
β’ Layout
β’ Partition status
β’ See also
β’ References
β’ External links
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Intel-based Macs
For accessing volumes, both APM and GPT partitions can be used in a standard manner with Mac OS X Tiger (10.4) and higher. For starting an operating system, PowerPC-based systems can only boot from APM disks.cite-ref-apple-2006-macos-server-5-0[5] In contrast, Intel-based systems generally boot from GPT disks.cite-ref-apple-tn2166-1-1[1]cite-ref-apple-6503281-6-0[6]cite-ref-apple-6117917-7-0[7] Nevertheless, older Intel-based Macs are able to boot from APM, GPT (GUID Partition Table) and MBR (Master Boot Record, using the BIOS-Emulation called EFI-CSM i.e. the Compatibility Support Module provided by EFI).
Intel-based models that came with Mac OS X Tiger (10.4) or Leopard (10.5) preinstalled had to be able to boot from both APM and GPT disks due to the installation media for these universal versions of Mac OS X, which are APM partitioned in order to remain compatible with PowerPC-based systems.cite-ref-macsales-8-0[8] However, the installation of OS X on an Intel-based Mac demands a GPT partitioned disk or will refuse to continue, the same way installation on a PowerPC-based system will demand an APM partitioned destination volume. Cloning an already installed OS X to an APM partition on Intel systems will remain bootable even on 2011 Intel-based Macs. Despite this apparent APM support, Apple never officially supported booting from an internal APM disk on an Intel-based system. The one exception for a universal version of Mac OS X (Tiger or Leopard) is an official Apple document describing how to set up a dual bootable external APM disk for use with PowerPC and Intel.cite-ref-apple-ht2595-9-0[9]
Layout
Each entry of the partition table is the size of one data block, which is normally 512 bytes.cite-ref-apple-tn2166-1-2[1]cite-ref-rebe-apm-10-0[10] Each partition entry on the table is the size of one block or sector of data. Because the partition table itself is also a partition, the size of this first partition limits the number of entries to the partition table itself.
The normal case is that 64 sectors (64 Γ 512 = 32 KB) are used by the Apple Partition Map: one block for the Driver Descriptor Map as Block 0, one block for the partition table itself and 62 blocks for a maximum of 62 data partitions.cite-ref-yellow-dog-11-0[11]
Each partition entry includes the starting sector and the size, as well as a name, a type, a position of the data area, and a possible boot code. It also includes the total number of partitions in that partition table.cite-ref-ioapplepartitionscheme-12-0[12] This ensures that, after reading the first partition table entry, the firmware is aware of how many blocks more to read from the media in order to process every partition table entry. All entries are in big-endian byte-order.
| Address | | Size in bytes | Contents | Required? |
|---|---|---|---|---|
| Decimal | Hex | Size in bytes | Contents | Required? |
| 0 | 0x0000 | 1 | signature1 (ASCII value "P" ) | No |
| 1 | 0x0001 | 1 | signature2 (ASCII value "M" ) | No |
| 2β3 | 0x0002 | 2 | reserved | No |
| 4β7 | 0x0004 | 4 | number of partitions (total) | Yes |
| 8β11 | 0x0008 | 4 | starting sector of partition | Yes |
| 12β15 | 0x000C | 4 | size of partition (in sectors) | Yes |
| 16β47 | 0x0010 | 32 | name of partition ( fixed ASCII right-sβ¦ | No |
| 48β79 | 0x0030 | 32 | type of partition ( fixed ASCII right-sβ¦ | No |
| 80β83 | 0x0050 | 4 | starting sector of data area in partitiβ¦ | No |
| 84β87 | 0x0054 | 4 | size of data area in partition (in sectβ¦ | No |
| 88β91 | 0x0058 | 4 | status of partition | No |
| 92β95 | 0x005C | 4 | starting sector of boot code | No |
| 96β99 | 0x0060 | 4 | size of boot code (in bytes) | No |
| 100β103 | 0x0064 | 4 | address of bootloader code | No |
| 104β107 | 0x0068 | 4 | reserved | No |
| 108β111 | 0x006C | 4 | boot code entry point | No |
| 112β115 | 0x0070 | 4 | reserved | No |
| 116β119 | 0x0074 | 4 | boot code checksum | No |
| 120β135 | 0x0078 | 16 | processor type ( fixed ASCII right-sideβ¦ | No |
| 136β511 | 0x0088 | 376 | reserved | No |
Partition identifiers
Types beginning with "Apple_" are reserved for assignment by Apple, all other custom defined types are free to use. However registration with Apple is encouraged.
| Identifier / type | Contents / file system |
|---|---|
| Apple_Boot | bootloader |
| Apple_Boot_RAID | bootloader |
| Apple_Bootstrap | NewWorld bootblock |
| Apple_Driver | device driver |
| Apple_Driver43 | SCSI Manager 4.3 device driver |
| Apple_Driver43_CD | SCSI CD-ROM device driver |
| Apple_Driver_ATA | ATA device driver |
| Apple_Driver_ATAPI | ATAPI device driver |
| Apple_Driver_IOKit | I/O Kit driver |
| Apple_Driver_OpenFirmware | |
| Apple_Extra | unused |
| Apple_Free | free space |
| Apple_FWDriver | FireWire device driver |
| Apple_HFS | Hierarchical File System |
| Apple_HFSX | HFS Plus |
| Apple_Loader | β |
| Apple_MDFW | firmware |
| Apple_MFS | Macintosh File System |
| Apple_partition_map | partition map |
| Apple_Patches | patches |
| Apple_PRODOS | ProDOS |
| Apple_RAID | RAID |
| Apple_Rhapsody_UFS | Unix File System |
| Apple_Scratch | empty |
| Apple_Second | |
| Apple_UFS | Unix File System |
| Apple_UNIX_SVR2 | A/UX , Unix |
| Apple_Void | ISO9660 padding |
| Be_BFS | Be File System |
| MFS | TiVo Media File System |
| Identifier / type | Name (typical) |
|---|---|
| Apple_Boot | MOSX_OF3_Booter , eXternal booter |
| Apple_Boot_RAID | Raid Partition |
| Apple_Driver | Macintosh |
| Apple_Driver43 | Macintosh |
| Apple_Driver43_CD | Macintosh |
| Apple_Driver_ATA | Macintosh |
| Apple_Driver_ATAPI | Macintosh |
| Apple_Driver_IOKit | Macintosh |
| Apple_Driver_OpenFirmware | Macintosh |
| Apple_Free | Extra |
| Apple_FWDriver | Macintosh |
| Apple_HFS | Apple_HFS |
| Apple_Loader | SecondaryLoader |
| Apple_MDFW | firmware |
| Apple_partition_map | Apple |
| Apple_Patches | Patch Partition |
| Apple_RAID | Apple_RAID_OfflineV2 |
| Apple_Rhapsody_UFS | Mac OS X Server |
| Apple_UFS | Mac OS X |
| MFS | MFS application region , MFS media regi⦠|
| Identifier / type | Remarks |
|---|---|
| Apple_Boot | This boot partition is used by Mac OS X⦠|
| Apple_Bootstrap | Although it is a general Open Firmware⦠|
| Apple_Driver | Classic Mac OS drivers partition |
| Apple_Driver43 | Classic Mac OS drivers partition |
| Apple_Driver43_CD | Classic Mac OS drivers partition |
| Apple_Driver_ATA | Classic Mac OS drivers partition |
| Apple_Driver_ATAPI | Classic Mac OS drivers partition |
| Apple_Driver_IOKit | Classic Mac OS drivers partition |
| Apple_Extra | This identifier masks an unused partiti⦠|
| Apple_Free | This identifier masks free space as a p⦠|
| Apple_FWDriver | Classic Mac OS drivers partition |
| Apple_HFS | While normally a HFS or HFS+ volume for⦠|
| Apple_HFSX | This partition contains a HFS+ volume w⦠|
| Apple_Loader | Like Apple_Boot but on Old World Macs,β¦ |
| Apple_MDFW | This partition is used by iPod to load⦠|
| Apple_MFS | This partition is used by Mac OS for th⦠|
| Apple_partition_map | The partition map is also a partition o⦠|
| Apple_Patches | Mac OS classic patch partition |
| Apple_PRODOS | ProDOS file system |
| Apple_RAID | This identifier marks a Mac OS X partit⦠|
| Apple_Rhapsody_UFS | This partition contains a Unix File Sys⦠|
| Apple_Scratch | This identifier marks an empty partitio⦠|
| Apple_Second | Second stage bootloader |
| Apple_UFS | This partition contains a Unix File Sys⦠|
| Apple_UNIX_SVR2 | Originally introduced for A/UX (Apple U⦠|
| Apple_Void | A dummy partition map entry to ensure c⦠|
| Be_BFS | This partition contains a Be File Syste⦠|
| MFS | Used to hold the proprietary Media File⦠|
Partition status
Partition status is a bit field composed of the flags:
| Value | Description | System |
|---|---|---|
| 0x00000001 | entry is valid | A/UX |
| 0x00000002 | entry is allocated | A/UX |
| 0x00000004 | entry in use | A/UX |
| 0x00000008 | entry contains boot information | A/UX |
| 0x00000010 | partition is readable | A/UX |
| 0x00000020 | partition is writable | A/UX, Macintosh |
| 0x00000040 | boot code is position independent | A/UX |
| 0x00000100 | partition contains chain -compatible dr⦠| Macintosh |
| 0x00000200 | partition contains a real driver | Macintosh |
| 0x00000400 | partition contains a chain driver | Macintosh |
| 0x40000000 | automatically mount at startup | Macintosh |
| 0x80000000 | the startup partition | Macintosh |
See also
β’ Amiga rigid disk block (RDB)
β’ BSD disklabel
β’ Extended boot record (EBR)
β’ GUID Partition Table (GPT)
β’ Host protected area (HPA)
β’ Master boot record (MBR)
References
cite-note-apple-tn2166-11. β "Technical Note TN2166 β Secrets of the GPT". Apple. Retrieved 2013-02-24. ...a standard block size of 512 bytes...Apple did consider extending APM to support larger disks. However, as such a change would break all existing partitioning tools...
cite-note-apple-ta21692-22. β Mac OS: Technical overview of disk volume structures
cite-note-apple-2786955-33. β Apple Support Communities: Guid Partition or Apple Partition? (2012)
cite-note-myers-apmtogpt-44. β MacTech Magazine: Apple's Transition from Apple Partition Map to the GUID Partition Table by Criss Myers
cite-note-apple-2006-macos-server-55. β Apple Mailing List: Subject: Re: Apple Partition Scheme or GUID Partition Scheme Archived 2009-04-06 at the Wayback Machine, Timothy Standing, 2006-04-30
cite-note-apple-6503281-66. β Apple Support Communities: Create a bootable clone using Disk Utility (2014): an example of problems trying to boot on an Intel Mac using an APM partitioned drive.
cite-note-apple-6117917-77. β Apple Support Communities: Running Mavericks + FCPX on External Boot Drive? (2014): OS X Mavericks does not boot from APM partitioned drives.
cite-note-apple-ht2595-99. β Mac OS X 10.5: Creating and maintaining a bootable "universal" external disk
cite-note-rebe-apm-1010. β citerefrebeklaus2007Rebe, RenΓ©; Klaus, Susanne (2007). "Creating custom Linux solutions β Apple Partition Map". T2 System Development Environment. While the original intent was to handle various block sizes, in practice only 512 byte blocks are supported.
cite-note-yellow-dog-1111. β "Yellow Dog Solutions β Attaching Firewire Disks to a Linux Box". Fixstars Corporation. Archived from the original on 2009-10-13. Retrieved 2013-02-24. Comment: The command pdisk -l /dev/sda shows a size of 63 blocks for the Apple_partition_map. There is a multitude of examples like this to be found on the internet.
cite-note-ioapplepartitionscheme-1212. β "IOApplePartitionScheme.h". Apple. 2009. Retrieved 2016-08-07.
External links
β’ Mac OS: Technical overview of disk volume structures Overview of the elements of a disk volume / partition
β’ File System Forensic Analysis: PC-based Partitions β Apple partitions Detailed technical analysis of the structure of Apple's partition map.